package com.hsp_java.collection_;


import java.util.ArrayList;
import java.util.List;

public class ColledctionMethod {

    public static void main(String[] args) {
        List list = new ArrayList();
        list.add("jack");
        list.add("0");
        list.add(true);

        System.out.println(list.size());
        list.remove("0");
        list.clear();
        List list2 = new ArrayList();
        list2.add("dsf");
        list2.add("sdcsaf");
        list.addAll(list2 );
        list.add("三国");
        list.removeAll(list2);
        System.out.println(list.size());

        System.out.println(list.contains("jack"));
        System.out.println(list.containsAll(list));
        System.out.println("list=" + list);
    }
}
